package com.sqfw.project.wpReport.controller;

import java.util.List;
import javax.servlet.http.HttpServletResponse;


import com.sqfw.project.wpReport.domain.dto.WpInfoDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.sqfw.framework.aspectj.lang.annotation.Log;
import com.sqfw.framework.aspectj.lang.enums.BusinessType;
import com.sqfw.project.wpReport.domain.WpInfoExamine;
import com.sqfw.project.wpReport.service.IWpInfoExamineService;
import com.sqfw.framework.web.controller.BaseController;
import com.sqfw.framework.web.domain.AjaxResult;
import com.sqfw.common.utils.poi.ExcelUtil;

/**
 * 三级承办单位绩效考核计分统计Controller
 * 
 * @author lx
 * @date 2023-07-21
 */
@RestController
@RequestMapping("/wpReport/wpInfoExamine")
public class WpInfoExamineController extends BaseController
{
    @Autowired
    private IWpInfoExamineService wpInfoExamineService;

    /**
     * 查询三级承办单位绩效考核计分统计列表
     */
    @PreAuthorize("@ss.hasPermi('getWpInfoExamineList')")
    @GetMapping("/getWpInfoExamineList")
    public AjaxResult getWpInfoExamineList(WpInfoExamine wpInfoExamine)
    {
        List<WpInfoExamine> wpInfoExamines = wpInfoExamineService.getWpInfoExamineList(wpInfoExamine);
        return AjaxResult.success(wpInfoExamines);
    }

    /**
     * 导出三级承办单位绩效考核计分统计列表
     */
    @Log(title = "三级承办单位绩效考核计分统计", businessType = BusinessType.EXPORT)
    @PreAuthorize("@ss.hasPermi('wpInfoExamine:export')")
    @PostMapping("/export")
    public void export(HttpServletResponse response,WpInfoExamine wpInfoExamine)
    {
        List<WpInfoExamine> list = wpInfoExamineService.getWpInfoExamineList(wpInfoExamine);
        ExcelUtil<WpInfoExamine> util = new ExcelUtil<WpInfoExamine>(WpInfoExamine.class);
        util.exportExcel(response, list, "三级承办单位绩效考核计分统计数据");
    }


}
